home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / nihcl-30.lha / nihcl-3.0 / Makefile < prev    next >
Makefile  |  1990-05-22  |  5KB  |  179 lines

  1. # $Header: /afs/alw.nih.gov/unix/sun4_40c/usr/local/src/nihcl-3.0/share/RCS/Makefile,v 3.0 90/05/22 22:58:11 kgorlen Rel $
  2. #
  3. # Make Targets:
  4. #
  5. #    errorfacility    Make and install error handling facility
  6. #    all        Make all non-MI class libraries and test suites (default)
  7. #    mi        Make all class libraries and test suites with support for multiple inheritance enabled
  8. #    verify        Run all verification test suites
  9. #    install        Install class libraries and header files in target directories
  10. #    examples    Make example programs for book
  11. #    exverify    Verify example programs
  12. #    cleantest    Remove generated files from test suites
  13. #    clean        Remove all generated files
  14.  
  15. # C++ compiler
  16. CC = CC
  17.  
  18. # C++ debug switch
  19. CCDEBUG =
  20. #CCDEBUG = -g
  21.  
  22. # C++ flags
  23. # NOTE: Disable +p option when compiling with AT&T R2.1
  24. CCFLAGS = +p
  25. #CCFLAGS =
  26.  
  27. # C++ include files
  28. I = /usr/include/CC
  29.  
  30. # If using BSD
  31. SYS = BSD
  32. # If using System V
  33. #SYS = SYSV
  34.  
  35. # Compile with nested types (works with AT&T R2.1 and GNU C++)
  36. NESTED_TYPES =
  37. #NESTED_TYPES = -DNESTED_TYPES
  38.  
  39. # Disable AT&T R2.0/R2.1 bug work-around code
  40. BUGDEFS =
  41. #BUGDEFS = -DBUG_bC2728 -DBUG_38 -DBUG_39 -DBUG_OPTYPECONST
  42. # Defining BUG_TOOBIG disables code that prevents C compiler "yacc stack overflows"
  43. #BUGDEFS = -DBUG_bC2728 -DBUG_38 -DBUG_39 -DBUG_OPTYPECONST -DBUG_TOOBIG
  44.  
  45. # Enable debug code
  46. DEBUGDEFS =
  47. #DEBUGDEFS = -DDEBUG_OBJIO -DDEBUG_PROCESS
  48.  
  49. # Flags for ln
  50. #LNFLAGS =
  51. LNFLAGS = -s
  52.  
  53. # If using "patch"
  54. MAIN = _main.c_p
  55. # If using "munch"
  56. #MAIN = _main.c_m
  57.  
  58. # Target library for installation of Error Facility
  59. LIB_ID = libC
  60.  
  61. # Target Directories for Installation
  62.  
  63. # directory for libnihcl.a
  64. NIHCLLIBDIR = /usr/local/lib
  65. # directory for NIHCL include files
  66. NIHCLINCDIR = /usr/include/nihcl
  67. # directory where ${LIB_ID}.a resides
  68. CLIBDIR = /usr/local/lib/C++R2.0
  69. # directory for errgen utility
  70. ERRGENDIR = /usr/local/bin
  71. # directory for errgen table file
  72. ERRTABDIR = /usr/local/lib
  73. # directory for errlib.h and errors.h
  74. ERRINCDIR = $I
  75.  
  76. ##########################################################
  77. # You normally will not need to edit anything after this #
  78. ##########################################################
  79.  
  80. # Other directories
  81. ERRFAC = errfac
  82. CLASSES = lib
  83. TEST = test
  84. VECTOR = vector
  85. VECTEST = vectest
  86. EX = ex
  87. SUBDIRS = ${ERRFAC} ${CLASSES} ${TEST} ${VECTOR} ${VECTEST} ${EX}
  88. COMMONFLAGS = CC=${CC} CCDEBUG=${CCDEBUG} CCFLAGS="${CCFLAGS}" I=$I SYS=${SYS} NESTED_TYPES=${NESTED_TYPES} BUGDEFS="${BUGDEFS}" DEBUGDEFS="${DEBUGDEFS}"
  89.  
  90. all: nihclclasses nihcltest vectorclasses vectortest
  91.  
  92. mi: nihclmiclasses nihclmitest vectormiclasses vectormitest
  93.  
  94. errorfacility:
  95.     cd ${ERRFAC}; \
  96.         ${MAKE} -f MAKEFILE ${MFLAGS} ${COMMONFLAGS}; \
  97.         ${MAKE} -f MAKEFILE ${MFLAGS} install ${COMMONFLAGS} \
  98.         ERRGENDIR=${ERRGENDIR} ERRTABDIR=${ERRTABDIR} ERRINCDIR=${ERRINCDIR} \
  99.         CLIBDIR=${CLIBDIR} LIB_ID=${LIB_ID}
  100.  
  101. nihclclasses:
  102.     cd ${CLASSES}; ${MAKE} -f MAKEFILE ${MFLAGS} \
  103.         ${COMMONFLAGS} MAIN=${MAIN} LNFLAGS=${LNFLAGS}
  104.  
  105. nihcltest:
  106.     cd ${TEST}; ${MAKE} -f MAKEFILE ${MFLAGS} \
  107.         ${COMMONFLAGS}
  108.  
  109. vectorclasses:
  110.     cd ${VECTOR}; ${MAKE} -f MAKEFILE ${MFLAGS} ${COMMONFLAGS} generic
  111.     cd ${VECTOR}; ${MAKE} -f MAKEFILE ${MFLAGS} ${COMMONFLAGS}
  112.  
  113. vectortest:
  114.     cd ${VECTEST}; ${MAKE} -f MAKEFILE ${MFLAGS} ${COMMONFLAGS}
  115.  
  116. nihclmiclasses:
  117.     cd ${CLASSES}; ${MAKE} -f MAKEFILE ${MFLAGS} \
  118.         ${COMMONFLAGS} MAIN=${MAIN} LNFLAGS=${LNFLAGS} \
  119.         MI=-DMI NIHCLLIB=libnihclmi.a
  120.  
  121. nihclmitest:
  122.     cd ${TEST}; ${MAKE} -f MAKEFILE ${MFLAGS} ${COMMONFLAGS} \
  123.         MI=-DMI NIHCLLIB=../lib/libnihclmi.a
  124.  
  125. vectormiclasses:
  126.     cd ${VECTOR}; ${MAKE} -f MAKEFILE ${MFLAGS} ${COMMONFLAGS} \
  127.         MI=-DMI NIHVECLIB=nihclvecmi.a generic
  128.     cd ${VECTOR}; ${MAKE} -f MAKEFILE ${MFLAGS} ${COMMONFLAGS} \
  129.         MI=-DMI NIHVECLIB=nihclvecmi.a
  130.  
  131. vectormitest:
  132.     cd ${VECTEST}; ${MAKE} -f MAKEFILE ${MFLAGS} ${COMMONFLAGS} \
  133.         MI=-DMI NIHCLLIB=../lib/libnihclmi.a NIHVECLIB=../vector/nihclvecmi.a
  134.  
  135. verify:
  136.     cd ${TEST}; verify
  137.     cd  ${VECTEST}; verify
  138.  
  139. install:
  140.     for i in ${CLASSES} ${VECTOR}; do \
  141.         (echo $$i; cd $$i; ${MAKE} -f MAKEFILE ${MFLAGS} install \
  142.         NIHCLLIBDIR=${NIHCLLIBDIR} NIHCLINCDIR=${NIHCLINCDIR} \
  143.         ); done
  144.  
  145. examples:
  146.     cd ${EX}; ${MAKE} -f MAKEFILE ${MFLAGS} ${COMMONFLAGS}
  147.  
  148. exverify:
  149.     cd ${EX}; verify
  150.  
  151. cleantest:
  152.     cd test; make -f MAKEFILE clean
  153.     cd vectest; make -f MAKEFILE clean
  154.  
  155. clean:
  156.     for i in ${SUBDIRS}; do \
  157.         (echo $$i; cd $$i; ${MAKE} -f MAKEFILE ${MFLAGS} clean); done
  158.  
  159. newdistribution:
  160.     -mkdir new-distribution
  161.     rm -rf share/Xfiles
  162.     echo ./RCS >>Xfiles
  163.     cd share; for i in ${SUBDIRS} doc info; do \
  164.         echo ./$$i/RCS >>Xfiles; \
  165.         echo ./$$i/attic >>Xfiles; \
  166.         echo ./$$i/core >>Xfiles; \
  167.     done
  168.     cd share; tar cfX - Xfiles .  | (cd ../new-distribution;tar xvf -)
  169.     (cd new-distribution; make clean; rm -r Xfiles; cd ..)
  170.  
  171. tape:
  172.     tar cvf /dev/rmt0 -C distribution .
  173.  
  174. cpiotape:
  175.     find distribution -depth -print | cpio -ocv >/dev/rmt0
  176.  
  177. cartridge:
  178.     tar cvf /dev/rst0 -C distribution .
  179.